﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using David.Framework.Web.Filter;
using David.FrameWork.Web.Controllers;
using David.WebSite.Data;
using David.WebSite.Web.Models;

namespace David.WebSite.Web.Controllers.API
{
    [LoggedApi]
    [ExceptionHandler]
    public class SettingsApiController : BaseApiController
    {
        [HttpGet]
        public Response<object> AdminsList()
        {
            var response = new Response<object>();
            var result = AdminsDataService.GetUseInfoList();
            response.data = result;
            return response;
        }

        [HttpGet]
        public Response<object> SystemLog()
        {
            var response = new Response<object>();
            var result = LogDataService.GetSystemLog();
            response.data = result;
            return response;
        }

        [HttpGet]
        public Response<object> ExceptionLog()
        {
            var response = new Response<object>();
            var result = LogDataService.GetSystemExceptionLog();
            response.data = result;
            return response;
        }
    }
}
